From 38192aab475d7aaa2995f24ecf5bebd3e28921c6 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Tue, 4 Aug 2026 17:53:11 +0000 Subject: [PATCH] Change column name SIGHTINGS.Source -> SIGHTINGS.Step --- .../sokwedb/indexes/create/sightings.m4 | 4 ++-- db/schemas/sokwedb/indexes/drop/sightings.m4 | 2 +- db/schemas/sokwedb/tables/create/sightings.m4 | 6 +++--- doc/src/analyzed/sightings.m4 | 19 +++++++++---------- doc/src/epilog.inc.m4 | 4 ++-- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/db/schemas/sokwedb/indexes/create/sightings.m4 b/db/schemas/sokwedb/indexes/create/sightings.m4 index 6920615..e512878 100644 --- a/db/schemas/sokwedb/indexes/create/sightings.m4 +++ b/db/schemas/sokwedb/indexes/create/sightings.m4 @@ -33,7 +33,7 @@ CREATE INDEX IF NOT EXISTS sightings_commid ON sightings (commid); -- An index on source is less useful, but be profligate -- and don't worry about write performance or disk space. -CREATE INDEX IF NOT EXISTS sightings_source ON sightings - (source); +CREATE INDEX IF NOT EXISTS sightings_step ON sightings + (step); diff --git a/db/schemas/sokwedb/indexes/drop/sightings.m4 b/db/schemas/sokwedb/indexes/drop/sightings.m4 index 802a927..fd7d688 100644 --- a/db/schemas/sokwedb/indexes/drop/sightings.m4 +++ b/db/schemas/sokwedb/indexes/drop/sightings.m4 @@ -26,6 +26,6 @@ DROP INDEX IF EXISTS DROP INDEX IF EXISTS sightings_animid; DROP INDEX IF EXISTS sightings_commid; -DROP INDEX IF EXISTS sightings_source; +DROP INDEX IF EXISTS sightings_step; diff --git a/db/schemas/sokwedb/tables/create/sightings.m4 b/db/schemas/sokwedb/tables/create/sightings.m4 index 805e268..53a8ccd 100644 --- a/db/schemas/sokwedb/tables/create/sightings.m4 +++ b/db/schemas/sokwedb/tables/create/sightings.m4 @@ -32,9 +32,9 @@ CREATE TABLE sightings ( ,commid TEXT NOT NULL CONSTRAINT "CommID must be a COMM_IDS.CommID value" REFERENCES comm_ids - ,source TEXT NOT NULL - CONSTRAINT "Source must be a SIGHTINGS_RECORDS.Code value" - REFERENCES sighting_records (code) + ,step INTEGER NOT NULL + CONSTRAINT "Step must be a SIGHTING_CONTROLS.Step value" + REFERENCES sighting_controls ); grant_ro_priv(`SIGHTINGS') diff --git a/doc/src/analyzed/sightings.m4 b/doc/src/analyzed/sightings.m4 index e3a0b14..6f0ea6f 100644 --- a/doc/src/analyzed/sightings.m4 +++ b/doc/src/analyzed/sightings.m4 @@ -44,8 +44,8 @@ other database content. The |NON_BREC_SIGHTING_SOURCES| table is intended to be the primary way of making manual adjustments to SIGHTINGS. It is used to add arbitrary sightings of a chimpanzee. -To remove a sighting, use the |SIGHTINGS.Source| column to determine -the source of the faulty data and correct the data. +To remove a sighting, use the |SIGHTINGS.Step| column to determine the +source of the faulty data and correct the data. The combination of |SIGHTINGS.Date| and |SIGHTINGS.AnimID| must be unique. @@ -125,17 +125,16 @@ CommID (Community IDentifier) |SIGHTINGS.CommID_summary| |notnull| -.. _SIGHTINGS.Source: +.. _SIGHTINGS.Step: -Source -`````` +Step +```` -.. |SIGHTINGS.Source_summary| replace:: - A code indicating the record-taking that is the source of the - sighting information. - A |SIGHTING_RECORDS|.\ |SIGHTING_RECORDS.Code| value. +.. |SIGHTINGS.Step_summary| replace:: + A code that provides detail on the source of the sighting information. + A |SIGHTING_CONTROLS|.\ |SIGHTING_CONTROLS.Step| value. -|SIGHTINGS.Source_summary| +|SIGHTINGS.Step_summary| See :ref:`above ` for more information on how the value of this column is determined. diff --git a/doc/src/epilog.inc.m4 b/doc/src/epilog.inc.m4 index e6542df..8c35cd8 100644 --- a/doc/src/epilog.inc.m4 +++ b/doc/src/epilog.inc.m4 @@ -830,8 +830,8 @@ elo_ranks_daily_rst(sdb_male, MT)dnl :ref:`AnimID ` .. |SIGHTINGS.CommID| replace:: :ref:`CommID ` -.. |SIGHTINGS.Source| replace:: - :ref:`Source ` +.. |SIGHTINGS.Step| replace:: + :ref:`Step ` .. |SIV_STATUS_BOUT| replace:: :ref:`SIV_STATUS_BOUT ` .. |SIV_STATUS_BOUT.ID| replace:: -- 2.34.1